home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / Chess++ ƒ / CChessPieces ƒ / CChessPiece.h < prev    next >
Text File  |  1993-04-25  |  706b  |  27 lines

  1. /****
  2.  * CChessPiece.h
  3.  *
  4.  *    Abstract class representing the Chess peices.
  5.  *
  6.  *    Copyright © 1993 Steven J. Bushell. All rights reserved.
  7.  *
  8.  ****/
  9. #pragma once
  10. #include <CObject.h> 
  11.  
  12. #define kKingValue 0x5000
  13.  
  14. CLASS CChessBoard;
  15.  
  16. class CChessPiece : public CObject {
  17. public:
  18.     Boolean    itsColor;
  19.     short    itsValue;
  20.  
  21.     virtual void        IChessPiece(short aColor);
  22.     virtual void        Draw(short rank, short file); // abstract Draw method -- must be overridden
  23.     virtual Boolean        IsValidMove(CChessBoard *aBoard, short newRank, short newFile);
  24.     virtual short        BoardLocationValue(CChessBoard *aBoard, short rank, short file);
  25.     virtual CIconHandle    GetCicnHandle(void);
  26.     virtual void        RegisterMove(short rank, short file);
  27. };